<div class="panel_izquierdo">
    <h3><?php __('Opciones'); ?></h3>
    <ul>
        <li><?php echo $this->Html->link(__('Crear Nuevo', true), array('controller'=>'presupuestos','action' => 'index_requisicion')); ?></li>
    </ul>
</div>
<div class="contenido">

    <?php
    echo $form->create('Requisicion', array(
    'url' => array_merge(array('action' => ''), $this->params['pass']),
    'class'=> 'search'
    ));
    echo $form->input('empresa', array('div' => false));
    echo $form->submit('Buscar', array('div' => false));
    echo $this->Html->link('Limpiar',array('action' => ''));
    echo $form->end();
    echo "<br /><hr /><br /><br />"
    ?>

    <h2><?php __('Requisiciones');?></h2>
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th><?php echo $this->Paginator->sort('Orden Inspeccion','orden_inspeccion_id');?></th>
            <th><?php echo $this->Paginator->sort('fecha');?></th>
            <th><?php echo $this->Paginator->sort('Empresa','OrdenInspeccion.empresa');?></th>
            <th><?php echo $this->Paginator->sort('solicitado_por');?></th>
            <th class="actions"><?php __('Opciones');?></th>
        </tr>
        <?php
        $i = 0;
        foreach ($requisicions as $requisicion):
            $class = null;
            if ($i++ % 2 == 0) {
                $class = ' class="altrow"';
            }
            ?>
        <tr<?php echo $class;?>>
            <td>
                    <?php echo $this->Html->link($requisicion['OrdenInspeccion']['correlativo'], array('controller' => 'orden_inspeccions', 'action' => 'view', $requisicion['OrdenInspeccion']['id'])); ?>
            </td>
            <td><?php echo $requisicion['Requisicion']['fecha']; ?>&nbsp;</td>
            <td><?php echo $requisicion['OrdenInspeccion']['empresa']; ?>&nbsp;</td>
            <td><?php echo $requisicion['Requisicion']['solicitado_por']; ?>&nbsp;</td>
            <td class="actions">
                    <?php echo $this->Html->link(__('Mostrar', true), array('action' => 'view', $requisicion['Requisicion']['id'])); ?>
                    <?php echo $this->Html->link(__('Modificar', true), array('action' => 'edit', $requisicion['Requisicion']['id'])); ?>
                    <?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $requisicion['Requisicion']['id']), null, sprintf(__('Desea realmente eliminar el registro?', true))); ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </table>
    <p>
        <?php
        echo $this->Paginator->counter(array(
        'format' => __('Pagina %page% de %pages%, mostrando %current% registros de un total de %count%', true)
        ));
        ?>	</p>

    <div class="paging">
        <?php echo $this->Paginator->prev('<< ' . __('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
        |
        <?php echo $this->Paginator->next(__('Siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
    </div>
</div>
